home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.2
/
Video Toaster v4.2.iso
/
arexx
/
cg
/
bumplines.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-08
|
1KB
|
52 lines
/* BumpLines.rexx V2.0 -- Pushes lines up and spaces them evenly */
/* By Bob Caron © 1995 NewTek, Inc. */
call remlib(CG_AREXX)
call addlib(CG_AREXX,0)
page_type=GET_PAGE(TYPE)
page_limit=400
if page_type = 'Scroll' then page_limit = 0
if page_type = 'Crawl' then do
REQ_ASK("This macro wont","work on crawl","pages.")
exit
end
space=REQ_STRING("Space Between Lines?",3)
if space < 1 then space=1
current_line=1
total_lines=GET_PAGE(SIZE)
lastsize=0
do while current_line <= total_lines
call SET_LINE(current_line)
call PICKLINE()
line_pos=GET_LINE(SPOT)
lastsize=bump_line(line_pos' 'current_line' 'space' 'page_limit' 'lastsize)
current_line=current_line+1
end
call PICKPAGE(NOT)
call remlib(CG_AREXX)
exit
/* Subroutines */
bump_line: procedure
arg x y line space page_limit lastsize
font_tall=get_line(TALL)
new_y=lastsize
if new_y<10 then do
new_y=10
lastsize=new_y
end
if (page_limit = 400) & (new_y>400) then
new_y = 400-font_tall
else
line_type=GET_LINE(TYPE)
if line_type = 'Text' then call SET_LINE(SPOT,x,new_y)
return lastsize+font_tall+space